import Cookies from "js-cookie";

var cookies = {
  t: "ecc90bf310286e72c8d460a9d6ead290",
  login_current_pk: "1482803884806535",
  l: "fBxdUne4NPPtD0FOBOfwPurza77tjIRAguPzaNbMi9fP_UfD5TIAW1CB_uYkCnGVFsneR3S3hc2kBeYBqXhKnxvOFIstRVkmnjvdvmf..",
  yunpk: "1482803884806535",
  currentRegionId: "cn-hangzhou",
  cna: "leOjHH+oLnUCAXUZJzNQs/A0",
  login_aliyunid_pk: "1482803884806535",
  aliyun_lang: "zh",
  channel:
    "PlCvvcf7IYJvQTdHt4LkHPN4Mxpc%2B2E2rR%2B88keQda3aYJmnc9oIwnp1oQGmMRiuKK1%2FmnVFSp%2F%2FH%2Fe9GfrhLw%3D%3D",
  cnaui: "%2522cys_5****%2522",
  aui: "%2522cys_5****%2522",
  partitioned_cookie_flag: "doubleRemove",
  _tb_token_: "e3876833beb7e",
  sca: "557f528d",
  login_aliyunid: '"cys_5****"',
  login_aliyunid_csrf: "_csrf_tk_1984818096548748",
  login_aliyunid_pks: '"BG+twvQ0t505dasZ3As3EgribupdLZvlJvaa0SjwuCVDf4',
  aliyun_country: "CN",
  aliyun_site: "CN",
  ak_user_locale: "zh_CN",
  help_csrf:
    "zFeF%2BxrPcsnBw9JseI4fGclZMVV3yDbY6ZwRBi9M%2Bp0Kkr%2Fw7U0CKqWxcpeSre6Ey262RLFnaaBjTfFZV3UVzJoqkYFtuSbm0n002TGcJp2dyGJLzFgzbYKaaUxPrHUr0aiUvILl0WPJVzlNwIZbNg%3D%3D",
  cr_token: "82865ef7-e63d-4573-9a0a-4523c9d3a415",
  atpsida: "5380dead7baf1da839dc10c8_1718097176_3",
  isg: "BEZGGCCRXDnftQqplU3x4spNlzzIp4phTRFtDDB_rG_uM9BNmDMUcG-KD2__nIJ5",
  tfstk:
    "f1jrE7q1quEz2a_HgIte_w8Ny9KJBhFsqMOBK9XHFQAlA8eFKI5eATgWFw7VtsLWZWKWTDff_eiQ2WneK61yAQAHKtvDeL8hOB67LYIV_Di7wzBnYHt315Z_fTBWvHVsf3J0uYpBd0AnOQYDiDC0TrE_fTBoFL21nlwKLIG29BxHreA0mIpIrpfH-tXDMppnZpmu3tAvKHmH-pYmnpvwELAoIrWlKmJ6rRXbHu-rKzmv9TAqbtI2ElKaXUnHdZYXzGEeMDvF0L8ysTj-KW0Hnis25EMQgnXOl_v2bul9UZXwqpSLI2Re8gK2LZFrP15JKtYVNJgp3wWhX3KZKuX24Q8MUUZUL1XVKNTVcRq943AlR3BIQ76V4_6R09Mno3-5uFSyjlhkOZ6NYpSL9o5NKOQHuMlP4ThpnD1dvaln8Uvv3Cw4nXgq2AT4KqVEJ2LDXKR_FLgKJUvW3Cwku23pyDJ218ic.",
};

const setCookies = () => {
  Object.keys(cookies).forEach((key) => {
    Cookies.set(key, cookies[key]);
  });
};

const getAlyunxiaoCookie = () => {
  var a = document.cookie.split(";");
  var o = {};
  a.forEach((r) => {
    var b = r.split("=");
    if (b && b.length) {
      o[b[0].replace(/^\s|\s$/g, "")] = b[1] || "";
    }
  });
  return o;
};

export default setCookies;
